{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "# An interactive Git Tutorial: the tool you didn't know you needed\n",
    "\n",
    "## From personal workflows to open collaboration"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Note:** this tutorial was particularly modeled, and therefore owes a lot, to the excellent materials offered in:\n",
    "\n",
    "- \"Git for Scientists: A Tutorial\" by John McDonnell (no link as this tutorial seems to have disappeared from the internet).\n",
    "- Emanuele Olivetti's lecture notes and exercises from the G-Node summer school on [Advanced Scientific Programming in Python](https://python.g-node.org/wiki/schedule).\n",
    "\n",
    "In particular I've reused the excellent images from the [Pro Git book](http://git-scm.com/book) that John had already selected and downloaded, as well as some of his outline.  But this version of the tutorial aims to be 100% reproducible by being executed directly as an IPython notebook and is hosted itself on github so that others can more easily make improvements to it by collaborating on Github.  Many thanks to John and Emanuele for making their materials available online.\n",
    "\n",
    "After writing this document, I discovered [J.R. Johansson](https://github.com/jrjohansson)'s [tutorial on version control](http://nbviewer.ipython.org/urls/raw.github.com/jrjohansson/scientific-python-lectures/master/Lecture-7-Revision-Control-Software.ipynb) that is also written as a fully reproducible notebook and is also aimed at a scientific audience.  It has a similar spirit to this one, and is part of his excellent series [Lectures on Scientific Computing with Python](https://github.com/jrjohansson/scientific-python-lectures) that is entirely available as Jupyter Notebooks."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Wikipedia"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "“Revision control, also known as version control, source control\n",
    "or software configuration management (SCM), is the\n",
    "**management of changes to documents, programs, and other\n",
    "information stored as computer files.**”"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Reproducibility?**\n",
    "\n",
    "* Tracking and recreating every step of your work\n",
    "* In the software world: it's called *Version Control*!\n",
    "\n",
    "What do (good) version control tools give you?\n",
    "\n",
    "* Peace of mind (backups)\n",
    "* Freedom (exploratory branching)\n",
    "* Collaboration (synchronization)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Git is an enabling technology: Use version control for everything"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* Paper writing (never get `paper_v5_john_jane_final_oct22_really_final.tex` by email again!)\n",
    "* Grant writing\n",
    "* Everyday research\n",
    "* Teaching (never accept an emailed homework assignment again!)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Teaching courses with Git"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![](images/indefero_projects_notes.png)\n",
    "\n",
    "<!-- offline: \n",
    "<img src=\"files/images/indefero_projects_notes.png\" width=\"100%\">\n",
    "<img src=\"https://raw.github.com/fperez/reprosw/master/fig/indefero_projects_notes.png\" width=\"100%\">\n",
    "-->"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Annotated history of each student's worfklow (and backup!)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!-- offline: \n",
    "    <img src=\"files/images/indefero_projects1.png\" width=\"100%\">\n",
    "<img src=\"https://raw.github.com/fperez/reprosw/master/fig/indefero_projects1.png\" width=\"100%\">\n",
    "    -->\n",
    "\n",
    "![](images/indefero_projects1.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The plan for this tutorial"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This tutorial is structured in the following way: we will begin with a brief overview of key concepts you need to understand in order for git to really make sense.  We will then dive into hands-on work: after a brief interlude into necessary configuration we will discuss 5 \"stages of git\" with scenarios of increasing sophistication and complexity, introducing the necessary commands for each stage:\n",
    "            \n",
    "1. Local, single-user, linear workflow\n",
    "2. Single local user, branching\n",
    "3. Using remotes as a single user\n",
    "4. Remotes for collaborating in a small team\n",
    "5. Full-contact github: distributed collaboration with large teams\n",
    "    \n",
    "In reality, this tutorial only covers stages 1-4, since for #5 there are many software develoment-oriented tutorials and documents of very high quality online.  But most scientists start working alone with a few files or with a small team, so I feel it's important to build first the key concepts and practices based on problems scientists encounter in their everyday life and without the jargon of the software world.  Once you've become familiar with 1-4, the excellent tutorials that exist about collaborating on github on open-source projects should make sense."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Very high level picture: an overview of key concepts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The **commit**: *a snapshot of work at a point in time*\n",
    "\n",
    "<!-- offline: \n",
    "![](images/commit_anatomy.png)\n",
    "\n",
    "<img src=\"https://raw.github.com/fperez/reprosw/master/fig/commit_anatomy.png\">\n",
    "-->\n",
    "\n",
    "![](images/commit_anatomy.png)\n",
    "\n",
    "Credit: ProGit book, by Scott Chacon, CC License."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "A **repository**: a group of *linked* commits\n",
    "\n",
    "<!-- offline: \n",
    "![](files/images/threecommits.png)\n",
    "\n",
    "<img src=\"https://raw.github.com/fperez/reprosw/master/fig/threecommits.png\" >\n",
    "-->\n",
    "\n",
    "![](images/threecommits.png)\n",
    "\n",
    "Note: these form a Directed Acyclic Graph (DAG), with nodes identified by their *hash*."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "A **hash**: a fingerprint of the content of each commit *and its parent*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hash: 3b32905baabd5ff22b3832c892078f78f5e5bd3b\n"
     ]
    }
   ],
   "source": [
    "from hashlib import sha1\n",
    "\n",
    "# Our first commit\n",
    "data1 = b'This is the start of my paper.'\n",
    "meta1 = b'date: 1/1/17'\n",
    "hash1 = sha1(data1 + meta1).hexdigest( )\n",
    "print('Hash:', hash1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hash: 1c12d2aad51d5fc33e5b83a03b8787dfadde92a4\n"
     ]
    }
   ],
   "source": [
    "# Our second commit, linked to the first\n",
    "data2 = b'Some more text in my paper...'\n",
    "meta2 = b'date: 1/2/1'\n",
    "# Note we add the parent hash here!\n",
    "hash2 = sha1(data2 + meta2 + hash1.encode()).hexdigest()\n",
    "print('Hash:', hash2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And this is pretty much the essence of Git!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## First things first: git must be configured before first use"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The minimal amount of configuration for git to work without pestering you is to tell it who you are. You should run a version of these commands in your shell:\n",
    "\n",
    "```bash\n",
    "git config --global user.name \"Fernando Perez\"\n",
    "git config --global user.email \"Fernando.Perez@berkeley.edu\"\n",
    "```\n",
    "\n",
    "And while we're at it, we also turn on the use of color, which is very useful\n",
    "\n",
    "```bash\n",
    "git config --global color.ui \"auto\"\n",
    "```\n",
    "\n",
    "Set git to use the credential memory cache so we don't have to retype passwords too frequently. \n",
    "\n",
    "Github offers in its help pages instructions on how to configure the credentials helper for [Mac OSX](https://help.github.com/articles/caching-your-github-password-in-git/#platform-mac), [Windows](https://help.github.com/articles/caching-your-github-password-in-git/#platform-mac) and [Linux](https://help.github.com/articles/caching-your-github-password-in-git/#platform-linux)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Stage 1: Local, single-user, linear workflow"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Type `git` to see a full list of all the 'core' commands.  We'll now go through most of these via small practical exercises:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]\n",
      "           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n",
      "           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\n",
      "           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n",
      "           <command> [<args>]\n",
      "\n",
      "These are common Git commands used in various situations:\n",
      "\n",
      "start a working area (see also: git help tutorial)\n",
      "   clone      Clone a repository into a new directory\n",
      "   init       Create an empty Git repository or reinitialize an existing one\n",
      "\n",
      "work on the current change (see also: git help everyday)\n",
      "   add        Add file contents to the index\n",
      "   mv         Move or rename a file, a directory, or a symlink\n",
      "   reset      Reset current HEAD to the specified state\n",
      "   rm         Remove files from the working tree and from the index\n",
      "\n",
      "examine the history and state (see also: git help revisions)\n",
      "   bisect     Use binary search to find the commit that introduced a bug\n",
      "   grep       Print lines matching a pattern\n",
      "   log        Show commit logs\n",
      "   show       Show various types of objects\n",
      "   status     Show the working tree status\n",
      "\n",
      "grow, mark and tweak your common history\n",
      "   branch     List, create, or delete branches\n",
      "   checkout   Switch branches or restore working tree files\n",
      "   commit     Record changes to the repository\n",
      "   diff       Show changes between commits, commit and working tree, etc\n",
      "   merge      Join two or more development histories together\n",
      "   rebase     Reapply commits on top of another base tip\n",
      "   tag        Create, list, delete or verify a tag object signed with GPG\n",
      "\n",
      "collaborate (see also: git help workflows)\n",
      "   fetch      Download objects and refs from another repository\n",
      "   pull       Fetch from and integrate with another repository or a local branch\n",
      "   push       Update remote refs along with associated objects\n",
      "\n",
      "'git help -a' and 'git help -g' list available subcommands and some\n",
      "concept guides. See 'git help <command>' or 'git help <concept>'\n",
      "to read about a specific subcommand or concept.\n"
     ]
    }
   ],
   "source": [
    "!git"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### `git init`: create an empty repository"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'/Users/fperez/teach/icesat2/intro-jupyter-git'"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%pwd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Initialized empty Git repository in /Users/fperez/teach/icesat2/intro-jupyter-git/test/.git/\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "rm -rf test\n",
    "git init test"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Note:** all these cells below are meant to be run by you in a terminal  where  you change *once* to the `test` directory and continue working there.\n",
    "\n",
    "Since we are putting all of them here in a single notebook for the purposes of the tutorial, they will all be prepended with the first two lines:\n",
    "\n",
    "    %%bash\n",
    "    cd test\n",
    "\n",
    "that tell IPython to do that each time.  But you should ignore those two lines and type the rest of each cell yourself in your terminal."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's look at what git did:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "total 0\n",
      "drwxr-xr-x   3 fperez  staff   96 Jun 19 08:52 .\n",
      "drwxr-xr-x  31 fperez  staff  992 Jun 19 08:52 ..\n",
      "drwxr-xr-x   9 fperez  staff  288 Jun 19 08:52 .git\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "ls -la"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "total 24\n",
      "-rw-r--r--   1 fperez  staff   23 Jun 19 08:52 HEAD\n",
      "-rw-r--r--   1 fperez  staff  137 Jun 19 08:52 config\n",
      "-rw-r--r--   1 fperez  staff   73 Jun 19 08:52 description\n",
      "drwxr-xr-x  13 fperez  staff  416 Jun 19 08:52 hooks\n",
      "drwxr-xr-x   3 fperez  staff   96 Jun 19 08:52 info\n",
      "drwxr-xr-x   4 fperez  staff  128 Jun 19 08:52 objects\n",
      "drwxr-xr-x   4 fperez  staff  128 Jun 19 08:52 refs\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "ls -l .git"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let's edit our first file in the test directory with a text editor... I'm doing it programatically here for automation purposes, but you'd normally be editing by hand"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "echo \"My first bit of text\" > file1.txt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### `git add`: tell git about this new file"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git add file1.txt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can now ask git about what happened with `status`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "On branch master\n",
      "\n",
      "No commits yet\n",
      "\n",
      "Changes to be committed:\n",
      "  (use \"git rm --cached <file>...\" to unstage)\n",
      "\n",
      "\tnew file:   file1.txt\n",
      "\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git status"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### `git commit`: permanently record our changes in git's database"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For now, we are *always* going to call `git commit` either with the `-a` option *or* with specific filenames (`git commit file1 file2...`).  This delays the discussion of an aspect of git called the *index* (often referred to also as the 'staging area') that we will cover later.  Most everyday work in regular scientific practice doesn't require understanding the extra moving parts that the index involves, so on a first round we'll bypass it.  Later on we will discuss how to use it to achieve more fine-grained control of what and how git records our actions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master (root-commit) f850212] This is our first commit\n",
      " 1 file changed, 1 insertion(+)\n",
      " create mode 100644 file1.txt\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git commit -a -m\"This is our first commit\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In the commit above, we  used the `-m` flag to specify a message at the command line.  If we don't do that, git will open the editor we specified in our configuration above and require that we enter a message.  By default, git refuses to record changes that don't have a message to go along with them (though you can obviously 'cheat' by using an empty or meaningless string: git only tries to facilitate best practices, it's not your nanny)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### `git log`: what has been committed so far"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "commit f850212ca594f6e4c4ba246f1567f1d21e8869a8\n",
      "Author: Fernando Perez <Fernando.Perez@berkeley.edu>\n",
      "Date:   Wed Jun 19 08:52:41 2019 -0700\n",
      "\n",
      "    This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git log"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### `git diff`: what have I changed?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's do a little bit more work... Again, in practice you'll be editing the files by hand, here we do it via shell commands for the sake of automation (and therefore the reproducibility of this tutorial!)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true
    }
   },
   "outputs": [],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "echo \"And now some more text...\" >> file1.txt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And now we can ask git what is different:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "diff --git a/file1.txt b/file1.txt\n",
      "index ce645c7..4baa979 100644\n",
      "--- a/file1.txt\n",
      "+++ b/file1.txt\n",
      "@@ -1 +1,2 @@\n",
      " My first bit of text\n",
      "+And now some more text...\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git diff"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The format of the output above is well explained in detail in [this Stack Overflow post](https://stackoverflow.com/questions/2529441/how-to-read-the-output-from-git-diff).  But we can provide a brief summary here:\n",
    "\n",
    "```\n",
    "diff --git a/file1.txt b/file1.txt\n",
    "```\n",
    "\n",
    "This tells us which files changed overall, with 'a' representing the old path and 'b' the new one (in this case it's the same file, though if a file had been renamed it would be different).\n",
    "\n",
    "```\n",
    "index ce645c7..4baa979 100644\n",
    "```\n",
    "These are hashes of the file at the two stages, needed by git itself for other operations with the diff output.\n",
    "\n",
    "The next block shows the actual changes. The first two lines show which paths are being compared (in this case the same file, `file1.txt`): \n",
    "\n",
    "\n",
    "```\n",
    "--- a/file1.txt\n",
    "+++ b/file1.txt\n",
    "```\n",
    "\n",
    "The next line indicates where the changes happened. The format is `@@ from-file-range to-file-range @@`, where there's one more `@` character than there's parents to the file comparison (git can handle multi-way diff/merges), adn the file range format is `-/+<start line>,<# of lines>`, with `-` for the `from-file` and `+` for the `to-file`:\n",
    "\n",
    "```\n",
    "@@ -1 +1,2 @@\n",
    "```\n",
    "\n",
    "Lines prepended with `-` correspond to deletions (none in this case), and lines with `+` to additions. A few lines around deletions/additions are shown for context:\n",
    "\n",
    "```\n",
    " My first bit of text\n",
    "+And now some more text...\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### The cycle of git virtue: work, commit, work, commit, ..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master 943ee30] I have made great progress on this critical matter.\n",
      " 1 file changed, 1 insertion(+)\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git commit -a -m\"I have made great progress on this critical matter.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### `git log` revisited"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First, let's see what the log shows us now:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "commit 943ee30cdfc3a32f4b6f8f8c6b1ef4f6ca505624\n",
      "Author: Fernando Perez <Fernando.Perez@berkeley.edu>\n",
      "Date:   Wed Jun 19 08:52:56 2019 -0700\n",
      "\n",
      "    I have made great progress on this critical matter.\n",
      "\n",
      "commit f850212ca594f6e4c4ba246f1567f1d21e8869a8\n",
      "Author: Fernando Perez <Fernando.Perez@berkeley.edu>\n",
      "Date:   Wed Jun 19 08:52:41 2019 -0700\n",
      "\n",
      "    This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git log"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Sometimes it's handy to see a very summarized version of the log:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git log --oneline --topo-order --graph"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Git supports *aliases:* new names given to command combinations. Let's make this handy shortlog an alias, so we only have to type `git slog` and see this compact log:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "# We create our alias (this saves it in git's permanent configuration file):\n",
    "git config --global alias.slog \"log --oneline --topo-order --graph\"\n",
    "\n",
    "# And now we can use it\n",
    "git slog"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### `git mv` and `rm`: moving and removing files"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "While `git add` is used to add fils to the list git tracks, we must also tell it if we want their  names to change or for it to stop tracking them.  In familiar Unix fashion, the `mv` and `rm` git commands do precisely this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "On branch master\n",
      "Changes to be committed:\n",
      "  (use \"git reset HEAD <file>...\" to unstage)\n",
      "\n",
      "\trenamed:    file1.txt -> file-newname.txt\n",
      "\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git mv file1.txt file-newname.txt\n",
    "git status"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that these changes must be committed too, to become permanent!  In git's world, until something hasn't been committed, it isn't permanently recorded anywhere."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master db7b10a] I like this new name better\n",
      " 1 file changed, 0 insertions(+), 0 deletions(-)\n",
      " rename file1.txt => file-newname.txt (100%)\n",
      "Let's look at the log again:\n",
      "* db7b10a I like this new name better\n",
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git commit -a -m\"I like this new name better\"\n",
    "echo \"Let's look at the log again:\"\n",
    "git slog"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And `git rm` works in a similar fashion."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Exercise"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Add a new file `file2.txt`, commit it, make some changes to it, commit them again, and then remove it (and don't forget to commit this last step!)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Local user, branching"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "What is a branch?  Simply a *label for the 'current' commit in a sequence of ongoing commits*:\n",
    "\n",
    "![](images/masterbranch.png)\n",
    "\n",
    "<!-- offline: \n",
    "<img src=\"https://raw.github.com/fperez/reprosw/master/fig/masterbranch.png\" >\n",
    "-->"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There can be multiple branches alive at any point in time; the working directory is the state of a special pointer called HEAD.  In this example there are two branches, *master* and *testing*, and *testing* is the currently active branch since it's what HEAD points to:\n",
    "\n",
    "![](images/HEAD_testing.png)\n",
    "\n",
    "<!-- offline: \n",
    "<img src=\"https://raw.github.com/fperez/reprosw/master/fig/HEAD_testing.png\" >\n",
    "-->"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Once new commits are made on a branch, HEAD and the branch label move with the new commits:\n",
    "\n",
    "![](images/branchcommit.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This allows the history of both branches to diverge:\n",
    "\n",
    "![](images/mergescenario.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "But based on this graph structure, git can compute the necessary information to merge the divergent branches back and continue with a unified line of development:\n",
    "    \n",
    "![](images/mergeaftermath.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's now illustrate all of this with a concrete example.  Let's get our bearings first:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "On branch master\n",
      "nothing to commit, working tree clean\n",
      "file-newname.txt\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git status\n",
    "ls"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We are now going to try two different routes of development: on the `master` branch we will add one file and on the `experiment` branch, which we will create, we will add a different one.  We will then merge the experimental branch into `master`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Switched to branch 'experiment'\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git branch experiment\n",
    "git checkout experiment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[experiment c5f8e8a] Trying something new\n",
      " 1 file changed, 1 insertion(+)\n",
      " create mode 100644 experiment.txt\n",
      "* c5f8e8a Trying something new\n",
      "* db7b10a I like this new name better\n",
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "echo \"Some crazy idea\" > experiment.txt\n",
    "git add experiment.txt\n",
    "git commit -a -m\"Trying something new\"\n",
    "git slog"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "* db7b10a I like this new name better\n",
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Switched to branch 'master'\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git checkout master\n",
    "git slog"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master 5bb96bd] The mainline keeps moving\n",
      " 1 file changed, 1 insertion(+)\n",
      "* 5bb96bd The mainline keeps moving\n",
      "* db7b10a I like this new name better\n",
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "echo \"All the while, more work goes on in master...\" >> file-newname.txt\n",
    "git commit -a -m\"The mainline keeps moving\"\n",
    "git slog"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "By default, all variations of the git `log` commands only show the currently active branch.  If we want to see *all* branches, we can ask for them with the `--all` flag:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "* 5bb96bd The mainline keeps moving\n",
      "| * c5f8e8a Trying something new\n",
      "|/  \n",
      "* db7b10a I like this new name better\n",
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git slog --all"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Above, we can see the commit whose message is `Try something new`, that comes from the `experiment` branch."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "file-newname.txt\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "ls"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Merge made by the 'recursive' strategy.\n",
      " experiment.txt | 1 +\n",
      " 1 file changed, 1 insertion(+)\n",
      " create mode 100644 experiment.txt\n",
      "*   f449025 Merge branch 'experiment'\n",
      "|\\  \n",
      "| * c5f8e8a Trying something new\n",
      "* | 5bb96bd The mainline keeps moving\n",
      "|/  \n",
      "* db7b10a I like this new name better\n",
      "* 943ee30 I have made great progress on this critical matter.\n",
      "* f850212 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git merge experiment\n",
    "git slog"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Using remotes as a single user"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We are now going to introduce the concept of a *remote repository*: a pointer to another copy of the repository that lives on a different location.  This can be simply a different path on the filesystem or a server on the internet.\n",
    "\n",
    "For this discussion, we'll be using remotes hosted on the [GitHub.com](http://github.com) service, but you can equally use other services like [BitBucket](http://bitbucket.org) or [Gitorious](http://gitorious.org) as well as host your own."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "experiment.txt\n",
      "file-newname.txt\n",
      "Let's see if we have any remote repositories here:\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "ls\n",
    "echo \"Let's see if we have any remote repositories here:\"\n",
    "git remote -v"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Since the above cell didn't produce any output after the `git remote -v` call, it means we have no remote repositories configured.  We will now proceed to do so.  Once logged into GitHub, go to the [new repository page](https://github.com/new) and make a repository called `test`.  Do **not** check the box that says `Initialize this repository with a README`, since we already have an existing repository here.  That option is useful when you're starting first at Github and don't have a repo made already on a local computer.\n",
    "\n",
    "We can now follow the instructions from the next page:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Branch master set up to track remote branch master from origin.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "To https://github.com/fperez/test.git\n",
      " * [new branch]      master -> master\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git remote add origin https://github.com/fperez/test.git\n",
    "git push -u origin master"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's see the remote situation again:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "origin\thttps://github.com/fperez/test.git (fetch)\n",
      "origin\thttps://github.com/fperez/test.git (push)\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git remote -v"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can now [see this repository publicly on github](https://github.com/fperez/test).\n",
    "\n",
    "Let's see how this can be useful for backup and syncing work between two different computers.  I'll simulate a 2nd computer by working in a different directory..."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/Users/fperez/teach/berkeley/2017-stat159/lecture-notes/lectures/git/test2\n",
      "origin\thttps://github.com/fperez/test.git (fetch)\n",
      "origin\thttps://github.com/fperez/test.git (push)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Cloning into 'test2'...\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "\n",
    "# Here I clone my 'test' repo but with a different name, test2, to simulate a 2nd computer\n",
    "git clone https://github.com/fperez/test.git test2\n",
    "cd test2\n",
    "pwd\n",
    "git remote -v"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's now make some changes in one 'computer' and synchronize them on the second."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master 94c7438] More work, on machine #2\n",
      " 1 file changed, 1 insertion(+)\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test2  # working on computer #2\n",
    "\n",
    "echo \"More new content on my experiment\" >> experiment.txt\n",
    "git commit -a -m\"More work, on machine #2\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we put this new work up on the github server so it's available from the internet"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "To https://github.com/fperez/test.git\n",
      "   27b0ec9..94c7438  master -> master\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test2\n",
    "\n",
    "git push"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let's fetch that work from machine #1:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Updating 27b0ec9..94c7438\n",
      "Fast-forward\n",
      " experiment.txt | 1 +\n",
      " 1 file changed, 1 insertion(+)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "From https://github.com/fperez/test\n",
      "   27b0ec9..94c7438  master     -> origin/master\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git pull"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### An important aside: conflict management"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "While git is very good at merging, if two different branches modify the same file in the same location, it simply can't decide which change should prevail.  At that point, human intervention is necessary to make the decision.  Git will help you by marking the location in the file that has a problem, but it's up to you to resolve the conflict.  Let's see how that works by intentionally creating a conflict.\n",
    "\n",
    "We start by creating a branch and making a change to our experiment file:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[trouble c480fb4] Changes in the trouble branch\n",
      " 1 file changed, 1 insertion(+)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Switched to branch 'trouble'\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git branch trouble\n",
    "git checkout trouble\n",
    "echo \"This is going to be a problem...\" >> experiment.txt\n",
    "git commit -a -m\"Changes in the trouble branch\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And now we go back to the master branch, where we change the *same* file:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Your branch is up-to-date with 'origin/master'.\n",
      "[master a8694ad] Mainline work\n",
      " 1 file changed, 1 insertion(+)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Switched to branch 'master'\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git checkout master\n",
    "echo \"More work on the master branch...\" >> experiment.txt\n",
    "git commit -a -m\"Mainline work\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "So now let's see what happens if we try to merge the `trouble` branch into `master`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Auto-merging experiment.txt\n",
      "CONFLICT (content): Merge conflict in experiment.txt\n",
      "Automatic merge failed; fix conflicts and then commit the result.\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git merge trouble"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's see what git has put into our file:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Some crazy idea\n",
      "More new content on my experiment\n",
      "<<<<<<< HEAD\n",
      "More work on the master branch...\n",
      "=======\n",
      "This is going to be a problem...\n",
      ">>>>>>> trouble\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "cat experiment.txt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "At this point, we go into the file with a text editor, decide which changes to keep, and make a new commit that records our decision.  I've now made the edits, in this case I decided that both pieces of text were useful, but integrated them with some changes:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Some crazy idea\n",
      "More new content on my experiment\n",
      "More work on the master branch...\n",
      "This is going to be a problem...\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "cat experiment.txt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's then make our new commit:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master 28e0c56] Completed merge of trouble, fixing conflicts along the way\n",
      "*   28e0c56 Completed merge of trouble, fixing conflicts along the way\n",
      "|\\  \n",
      "| * c480fb4 Changes in the trouble branch\n",
      "* | a8694ad Mainline work\n",
      "|/  \n",
      "* 94c7438 More work, on machine #2\n",
      "*   27b0ec9 Merge branch 'experiment'\n",
      "|\\  \n",
      "| * 2cba531 Trying something new\n",
      "* | ff8b2ec The mainline keeps moving\n",
      "|/  \n",
      "* 005d8e2 I like this new name better\n",
      "* e819b08 I have made great progress on this critical matter.\n",
      "* 1f299f3 This is our first commit\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd test\n",
    "\n",
    "git commit -a -m\"Completed merge of trouble, fixing conflicts along the way\"\n",
    "git slog"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "*Note:* While it's a good idea to understand the basics of fixing merge conflicts by hand, in some cases you may find the use of an automated tool useful.  Git supports multiple [merge tools](https://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html): a merge tool is a piece of software that conforms to a basic interface and knows how to merge two files into a new one.  Since these are typically graphical tools, there are various to choose from for the different operating systems, and as long as they obey a basic command structure, git can work with any of them."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Collaborating on github with a small team"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Single remote with shared access: we are going to set up a shared collaboration with one partner (the person sitting next to you).  This will show the basic workflow of collaborating on a project with a small team where everyone has write privileges to the same repository.  \n",
    "\n",
    "Note for SVN users: this is similar to the classic SVN workflow, with the distinction that commit and push are separate steps.  SVN, having no local repository, commits directly to the shared central resource, so to a first approximation you can think of `svn commit` as being synonymous with `git commit; git push`.\n",
    "\n",
    "We will have two people, let's call them Alice and Bob, sharing a repository.  Alice will be the owner of the repo and she will give Bob write privileges.  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We begin with a simple synchronization example, much like we just did above, but now between *two people* instead of one person.  Otherwise it's the same:\n",
    "\n",
    "- Bob clones Alice's repository.\n",
    "- Bob makes changes to a file and commits them locally.\n",
    "- Bob pushes his changes to github.\n",
    "- Alice pulls Bob's changes into her own repository."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Next, we will have both parties make non-conflicting changes each, and commit them locally.  Then both try to push their changes:\n",
    "\n",
    "- Alice adds a new file, `alice.txt` to the repo and commits.\n",
    "- Bob adds `bob.txt` and commits.\n",
    "- Alice pushes to github.\n",
    "- Bob tries to push to github.  What happens here?\n",
    "\n",
    "The problem is that Bob's changes create a commit that conflicts with Alice's, so git refuses to apply them.  It forces Bob to first do the merge on his machine, so that if there is a conflict in the merge, Bob deals with the conflict manually (git could try to do the merge on the server, but in that case if there's a conflict, the server repo would be left in a conflicted state without a human to fix things up).  The solution is for Bob to first pull the changes (pull in git is really fetch+merge), and then push again."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Full-contact github: distributed collaboration with large teams"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Multiple remotes and merging based on pull request workflow: this is beyond the scope of this brief tutorial, so we'll simply discuss how it works very briefly, illustrating it with the activity on the [IPython github repository](http://github.com/ipython/ipython)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Other useful commands"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- [show](http://www.kernel.org/pub/software/scm/git/docs/git-show.html)\n",
    "- [reflog](http://www.kernel.org/pub/software/scm/git/docs/git-reflog.html)\n",
    "- [rebase](http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html)\n",
    "- [tag](http://www.kernel.org/pub/software/scm/git/docs/git-tag.html)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "## Git resources"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Introductory materials"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There are lots of good tutorials and introductions for Git, which you\n",
    "can easily find yourself; this is just a short list of things I've found\n",
    "useful.  For a beginner, I would recommend the following 'core' reading list, and\n",
    "below I mention a few extra resources:\n",
    "\n",
    "1. The smallest, and in the style of this tuorial: [git - the simple guide](http://rogerdudler.github.com/git-guide)\n",
    "contains 'just the basics'.  Very quick read.\n",
    "\n",
    "1. In my own experience, the most useful resource was [Understanding Git\n",
    "Conceptually](http://www.sbf5.com/~cduan/technical/git).\n",
    "Git has a reputation for being hard to use, but I have found that with a\n",
    "clear view of what is actually a *very simple* internal design, its\n",
    "behavior is remarkably consistent, simple and comprehensible.\n",
    "\n",
    "1.  For more detail, see the start of the excellent [Pro Git book](http://book.git-scm.com).\n",
    "\n",
    "1. You can also [try Git in your browser](https://try.github.io) thanks to GitHub's interactive tutorial.\n",
    "\n",
    "If you are really impatient and just want a quick start, this [visual git tutorial](http://www.ralfebert.de/blog/tools/visual_git_tutorial_1)\n",
    "may be sufficient. It is nicely illustrated with diagrams that show what happens on the filesystem.\n",
    "\n",
    "For windows users, [an Illustrated Guide to Git on Windows](http://nathanj.github.com/gitguide/tour.html) is useful in that\n",
    "it contains also some information about handling SSH (necessary to interface with git hosted on remote servers when collaborating) as well\n",
    "as screenshots of the Windows interface.\n",
    "\n",
    "Cheat sheets: a useful [summary of common commands](https://github.com/nerdgirl/git-cheatsheet-visual/blob/master/gitcheatsheet.pdf) in PDF format that can be printed for frequent reference.  [Another nice PDF one](https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "slideshow": {
     "slide_type": "slide"
    }
   },
   "source": [
    "### Beyond the basics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "At some point, it will pay off to understand how git itself is *built*.  These two documents, written in a similar spirit, are probably the most useful descriptions of the Git architecture short of diving into the actual implementation.  They walk you through\n",
    "how you would go about building a version control system with a little story. By the end you realize that Git's model is almost an inevitable outcome of the proposed constraints:\n",
    "\n",
    "The [Git parable](http://tom.preston-werner.com/2009/05/19/the-git-parable.html) by Tom Preston-Werner.\n",
    "\n",
    "[Git foundations](http://matthew-brett.github.com/pydagogue/foundation.html) by Matthew Brett.\n",
    "\n",
    "[Git ready](http://www.gitready.com): A great website of posts on specific git-related topics, organized by difficulty.\n",
    "\n",
    "[QGit](http://sourceforge.net/projects/qgit/): an excellent Git GUI.\n",
    "\n",
    "Git ships by default with gitk and git-gui, a pair of Tk graphical clients to browse a repo and to operate in it. I personally have found [qgit](http://sourceforge.net/projects/qgit/) to be nicer and easier to use. It is available on modern linux distros, and since it is based on Qt, it should run on OSX and Windows.\n",
    "\n",
    "[Git Magic](http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html)\n",
    "\n",
    "Another book-size guide that has useful snippets.\n",
    "\n",
    "A [port](http://cworth.org/hgbook-git/tour) of the Hg book's beginning\n",
    "\n",
    "The [Mercurial book](http://hgbook.red-bean.com) has a reputation for clarity, so Carl Worth decided to [port](http://cworth.org/hgbook-git/tour) its introductory chapter to Git. It's a nicely written intro, which is possible in good measure because of how similar the underlying models of Hg and Git ultimately are.\n",
    "\n",
    "\n",
    "Finally, if you prefer a video presentation, this 1-hour tutorial prepared by the GitHub educational team will walk you through the entire process:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAgICwgICAgICAgICggGCAgICAgICgYICAcIBwcICAgIChANCAgOCQcHDRUODhERExMTBwsWGBYSGBASExIBBQUFBwYHDwkJDxQUERUUFBQVFBUUFBQUFBQVFBQUFRUUFxUUFBQUFBQUFBQUFBQUFBUUFBQUFBQUFBQUFBQUFP/AABEIAWgB4AMBIgACEQEDEQH/xAAdAAEAAQUBAQEAAAAAAAAAAAAABgMEBQcIAgEJ/8QAVRAAAQMCAwQECg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1LDUtlfDKPqlzY5WOztOoId2oP0bj2PpCPozLEexrrt9z8ypSbFuNi2qP8UQPDva5q46j8MLaYcKHAvhsQ+YKqPDJ2o9AwH4XEPmCDr87HVPpkYH/YP/8Aoqkexpv9JWyEdkcccf3uzFcenwy9qPQcB+FxD5gvB8Mfaf0HAvhcQ+YIOzmbM0cWrmGUj/myPcP7t8qjW1WPsphuoWtb9UBoADfUAuS6zwt9pZRY0uDN/cpq4H765Rms8ILG5SS6DDbnnuak5fUH1JHvQdB7R4nvH9Zxc4dd/Ataz9q722Fuz/Csxs/s42UtqnxOEk7RR00jJBT5XHrZXy3actjdrG+dr53nDlyHpzxdkhmEGH53hodeKqIeWatc7+03Lmmx9g5aLMQ+EnjTKl1YKDButG2LxY09d4s2Rt/7Q2IVtxU5XZc+bgAg6wOz8WDMpXyOhmx6qc6DCwGgRUrn2NRIIuFrHM973Oc7tUZ2knmhpcfmliLpYhDRTV0JJkqql5vUT2GrY8sgYwfVb+8uevKd2gJqXSU2EyvqdDJJBVl9PFmB3NO4Vd4ouX2teN1H8Q6cMWlhqaVkFBBHVzeOTmFlXmkcDG4D6Wqc3J9GOWbjqg1YiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiD/9k=\n",
      "text/html": [
       "\n",
       "        <iframe\n",
       "            width=\"400\"\n",
       "            height=\"300\"\n",
       "            src=\"https://www.youtube.com/embed/U8GBXvdmHT4\"\n",
       "            frameborder=\"0\"\n",
       "            allowfullscreen\n",
       "        ></iframe>\n",
       "        "
      ],
      "text/plain": [
       "<IPython.lib.display.YouTubeVideo at 0x104978b00>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from IPython.display import YouTubeVideo\n",
    "YouTubeVideo('U8GBXvdmHT4')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### A few useful tips for common tasks"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Better shell support\n",
    "\n",
    "Adding git branch info to your bash prompt and tab completion for git commands and branches is extremely useful.  I suggest you at least copy:\n",
    "\n",
    "- [git-completion.bash](https://github.com/git/git/blob/master/contrib/completion/git-completion.bash)\n",
    "- [git-prompt.sh](https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh)\n",
    " \n",
    "You can then source both of these files in your `~/.bashrc` and then set your prompt (I'll assume you named them as the originals but starting with a `.` at the front of the name):\n",
    "\n",
    "    source $HOME/.git-completion.bash\n",
    "    source $HOME/.git-prompt.sh\n",
    "    PS1='[\\u@\\h \\W$(__git_ps1 \" (%s)\")]\\$ '   # adjust this to your prompt liking\n",
    "\n",
    "See the comments in both of those files for lots of extra functionality they offer."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Embedding Git information in LaTeX documents\n",
    "\n",
    "(Sent by [Yaroslav Halchenko](http://www.onerussian.com))\n",
    "\n",
    "I use a Make rule:\n",
    "\n",
    "    # Helper if interested in providing proper version tag within the manuscript\n",
    "    revision.tex: ../misc/revision.tex.in ../.git/index\n",
    "       GITID=$$(git log -1 | grep -e '^commit' -e '^Date:' | sed  -e 's/^[^ ]* *//g' | tr '\\n' ' '); \\\n",
    "       echo $$GITID; \\\n",
    "       sed -e \"s/GITID/$$GITID/g\" $< >| $@\n",
    "\n",
    "in the top level `Makefile.common` which is included in all\n",
    "subdirectories which actually contain papers (hence all those\n",
    "`../.git`). The `revision.tex.in` file is simply:\n",
    "\n",
    "    % Embed GIT ID revision and date\n",
    "    \\def\\revision{GITID}\n",
    "\n",
    "The corresponding `paper.pdf` depends on `revision.tex` and includes the\n",
    "line `\\input{revision}` to load up the actual revision mark."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### git export\n",
    "\n",
    "Git doesn't have a native export command, but this works just fine:\n",
    "\n",
    "    git archive --prefix=fperez.org/  master | gzip > ~/tmp/source.tgz"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
